const { ccclass, property } = cc._decorator;

@ccclass
export default class XmSurface extends cc.Component {
    @property(cc.Label)
    label_top_title = null;

    @property(cc.Node)
    node_dh = null;

    @property(cc.Node)
    node_fxb = null;

    @property(cc.Node)
    node_fx = null;

    @property(cc.Node)
    node_gyw = null;

    @property(cc.Node)
    spr_down_1 = null;

    @property(cc.Node)
    spr_down_2 = null;

    @property(cc.Node)
    spr_down_3 = null;

    @property(cc.Node)
    spr_down_4 = null;

    onLoad() {
        this.down_1_callback();
    }

    down_1_callback() {
        this.label_top_title.string = "小狗爱旅游";
        this.node_dh.active = true;
        this.node_fxb.active = false;
        this.node_fx.active = false;
        this.node_gyw.active = false;
        this.spr_down_1.active = true;
        this.spr_down_2.active = false;
        this.spr_down_3.active = false;
        this.spr_down_4.active = false;
    }

    down_2_callback() {
        this.label_top_title.string = "本周口碑风向标";
        this.node_dh.active = false;
        this.node_fxb.active = true;
        this.node_fx.active = false;
        this.node_gyw.active = false;
        this.spr_down_1.active = false;
        this.spr_down_2.active = true;
        this.spr_down_3.active = false;
        this.spr_down_4.active = false;
    }

    down_3_callback() {
        this.label_top_title.string = "暑假假期推荐";
        this.node_dh.active = false;
        this.node_fxb.active = false;
        this.node_fx.active = true;
        this.node_gyw.active = false;
        this.spr_down_1.active = false;
        this.spr_down_2.active = false;
        this.spr_down_3.active = true;
        this.spr_down_4.active = false;
    }

    down_4_callback() {
        this.label_top_title.string = "我的";
        this.node_dh.active = false;
        this.node_fxb.active = false;
        this.node_fx.active = false;
        this.node_gyw.active = true;
        this.spr_down_1.active = false;
        this.spr_down_2.active = false;
        this.spr_down_3.active = false;
        this.spr_down_4.active = true;
    }
}
